90213: xfi:filter-member-network-selection

Documentation

Dimension tree-view of this testcase: primaryItems has the primary item used in dimension filter test instances (Peak), for an instance of mountain peaks each of a dimension of region and peak height, where this Peak primary item contains the mountain's name as its text. The Peak concept primary item has an all relationship to the SummitHypercube. hypercubes has the SummitHypercube and an explicit dimension, Location, arranged in hierarchy of regions each in separate extended link. regions breaks down into continents into countries, each in their own dimension as a DRS. This allows demonstrating the use of member hierarchies in a DRS with use of targetRole to assemble connected relationships.

Owners

Name Affiliation Email Start End
Herm Fischer UBMatrix / Mark V Systems fischer@markv.com 01-09-2008 at 00:00:00

References

function definition

Test Case Variations


V-01 A list of members of North America

Documentation

Peak(primaryItems)->SummitHypercube(hypercubes)->Location->Regions(regions)->America(americas)->NorthAmerica->(UnitedStates,Mexico,Canada). The test is organized to be insensitive to the order of returned member items, though the XPath 2 sequence operators mostly assure that it be in document order.

Inputs

  • schema: filter-member-dimension-values.xsd (DTS Discovery starting point) (ID=V01)
  • linkbase: filter-member-dimension-values-definition.xml
  • Function Call: xfi:filter-member-network-selection( QName('http://xbrl.org/formula/conformance/example','concept:Location'), xs:QName('concept:NorthAmerica'), "http://xbrl.org/formula/conformance/example/role/americas", "http://xbrl.org/int/dim/arcrole/domain-member", 'descendant' )

    (against file V01)

Outputs

  • Result test: $result instance of xs:QName* and count( $result ) eq 3 and index-of($result, QName('http://xbrl.org/formula/conformance/example','concept:Mexico')) and index-of($result, xs:QName('concept:Canada')) and index-of($result, QName('http://xbrl.org/formula/conformance/example','concept:UnitedStates'))

V-02 A list of members of Oceania (2 levels of descendants)

Documentation

Inputs

Outputs

  • Result test: $result instance of xs:QName* and count( $result ) eq 5 and index-of($result, xs:QName('concept:Australasia')) and index-of($result, xs:QName('concept:Australia')) and index-of($result, xs:QName('concept:NewZealand')) and index-of($result, xs:QName('concept:Melanesia')) and index-of($result, xs:QName('concept:Indonesia'))

V-03 A list of Oceania itself and just child subregions

Documentation

Inputs

  • schema: filter-member-dimension-values.xsd (DTS Discovery starting point) (ID=V03)
  • linkbase: filter-member-dimension-values-definition.xml
  • Function Call: xfi:filter-member-network-selection( xs:QName('concept:Location'), xs:QName('concept:Oceania'), "http://xbrl.org/formula/conformance/example/role/oceania", "http://xbrl.org/int/dim/arcrole/domain-member", 'child-or-self' )

    (against file V03)

Outputs

  • Result test: $result instance of xs:QName* and count( $result ) eq 3 and index-of($result, xs:QName('concept:Australasia')) and index-of($result, xs:QName('concept:Melanesia')) and index-of($result, xs:QName('concept:Oceania'))

V-04 A list of Asia itself and subregions with highest peaks

Documentation

Inputs

  • schema: filter-member-dimension-values.xsd (DTS Discovery starting point) (ID=V04)
  • linkbase: filter-member-dimension-values-definition.xml
  • Function Call: xfi:filter-member-network-selection( xs:QName('concept:Location'), xs:QName('concept:Asia'), "http://xbrl.org/formula/conformance/example/role/asia", "http://xbrl.org/int/dim/arcrole/domain-member", 'descendant-or-self' )

    (against file V04)

Outputs

  • Result test: $result instance of xs:QName* and count( $result ) eq 3 and index-of($result, xs:QName('concept:Asia')) and index-of($result, xs:QName('concept:SouthAsia')) and index-of($result, xs:QName('concept:Nepal'))

V-04a A empty list of children of child-less member

Documentation

Inputs

Outputs

  • Result test: empty( $result )

V-05 Error of non-member concept argument as dimension member argument

Documentation

Inputs

Outputs

  • Result test: empty( $result )

V-06 Error of non-XBRL element argument as dimension member argument

Documentation

Inputs

  • schema: filter-member-dimension-values.xsd (DTS Discovery starting point) (ID=V06)
  • linkbase: filter-member-dimension-values-definition.xml
  • Function Call: xfi:filter-member-network-selection( xs:QName('concept:Location'), xs:QName('concept:nonXbrlElement'), "http://xbrl.org/formula/conformance/example/role/oceania", "http://xbrl.org/int/dim/arcrole/domain-member", 'child' )

    (against file V06)

Outputs

  • Result test: empty( $result )

V-07 Raises an error for non-xbrl dimension element argument

Documentation

Tests that error is detected when the concept qname is an element, not an XBRL concept.

Inputs

  • schema: filter-member-dimension-values.xsd (DTS Discovery starting point) (ID=V07)
  • linkbase: filter-member-dimension-values-definition.xml
  • Function Call: xfi:filter-member-network-selection( xs:QName('concept:nonXbrlElement'), xs:QName('concept:Oceania'), "http://xbrl.org/formula/conformance/example/role/oceania", "http://xbrl.org/int/dim/arcrole/domain-member", 'child-or-self' )

    (against file V07)

Outputs

  • Error code: xfie:invalidDimensionQName

V-08 Raises an error for an attribute declaration argument

Documentation

Tests that error is detected when the dimension name argument declares an attribute.

Inputs

  • schema: filter-member-dimension-values.xsd (DTS Discovery starting point) (ID=V08)
  • linkbase: filter-member-dimension-values-definition.xml
  • Function Call: xfi:filter-member-network-selection( xs:QName('concept:anAttribute'), xs:QName('concept:Oceania'), "http://xbrl.org/formula/conformance/example/role/oceania", "http://xbrl.org/int/dim/arcrole/domain-member", 'child-or-self' )

    (against file V08)

Outputs

  • Error code: xfie:invalidDimensionQName

V-09 Raises an error for an xbrli namespace'ed argument

Documentation

Tests that error is detected when the dimension qname is xbrli:item

Inputs

  • schema: filter-member-dimension-values.xsd (DTS Discovery starting point) (ID=V09)
  • linkbase: filter-member-dimension-values-definition.xml
  • Function Call: xfi:filter-member-network-selection( xs:QName('xbrli:item'), xs:QName('concept:Oceania'), "http://xbrl.org/formula/conformance/example/role/foobar", "http://xbrl.org/formula/conformance/example/role/foobar", 'child-or-self' )

    (against file V09)

Outputs

  • Error code: xfie:invalidDimensionQName

V-10 Filter-member network is ambiguous but not referenced

Documentation

Filter-member network has an ambiguity but function call is not referencing link role containing ambiguity in this variation.

Inputs

  • schema: ambiguity-test-concepts.xsd (DTS Discovery starting point) (ID=V10)
  • linkbase: ambiguity-test-concepts-definition.xml
  • Function Call: xfi:filter-member-network-selection( xs:QName('concept:Dimension'), xs:QName('concept:MemB'), "http://xbrl.org/formula/conformance/example/role/dimensions", "http://xbrl.org/int/dim/arcrole/domain-member", 'child-or-self' )

    (against file V10)

Outputs

  • Result test: $result instance of xs:QName* and count( $result ) eq 2 and index-of($result, xs:QName('concept:MemB')) and index-of($result, xs:QName('concept:MemC'))

V-11 Filter-member network that is referenced is ambiguous

Documentation

Filter-member network has an ambiguity which is referenced by the linkrole and arcrole of the function call. The ambiguity is introduced because there are two different extended links (of role test-role, one presentationLink, the other definitionLink) that each define the same arcs (of arcrole test-arcrole). Each link has MemA->MemB->MemC. This ambiguity is no longer an error. Thus there are two relationships each to memB and to memC, which is the same situation as when a 'normal' network has a domain member appearing as multiple leaf nodes in the same hierarchy. Because the result is a set, which by definition has only distinct members, the result has only one each of memB and memC reported.

Inputs

  • schema: ambiguity-test-concepts.xsd (DTS Discovery starting point) (ID=V11)
  • linkbase: ambiguity-test-concepts-definition.xml
  • Function Call: xfi:filter-member-network-selection( xs:QName('concept:Dimension'), xs:QName('concept:MemB'), "http://xbrl.org/formula/conformance/example/role/test-role", "http://xbrl.org/formula/conformance/example/arcrole/test-arcrole", 'child-or-self' )

    (against file V11)

Outputs

  • Result test: $result instance of xs:QName* and count( $result ) eq 2 and index-of($result, xs:QName('concept:MemB')) and index-of($result, xs:QName('concept:MemC'))

V-12 Filter-member network that is referenced is ambiguous but prohibited by extension linkbase

Documentation

Filter-member network ambiguity arcs are prohibited by an extension linkbase, to verify that ambiguous arcs prohibition works in the formula processor.

Inputs

Outputs

  • Result test: $result instance of xs:QName* and count( $result ) eq 2 and index-of($result, xs:QName('concept:MemB')) and index-of($result, xs:QName('concept:MemC'))

V-13 Filter-member network can be of any link role and arc role in any linkbase, test presentation linkbase

Documentation

A filter-member network in presentation linkbase, link test-role1, custom arcrole test-arcrole, has hierarchy dim, memA, memB, memC, but in definition linkbase, link test-role2, has hierarchy dim, memC, memB, memA. This test should retrieve the hierarchy of memB and below (child-or-self), from the presentation linkbase, e.g., getting memB and memC.

Inputs

Outputs

  • Result test: $result instance of xs:QName* and count( $result ) eq 2 and index-of($result, xs:QName('concept:MemB')) and index-of($result, xs:QName('concept:MemC'))

V-14 Filter-member network can be of any link role and arc role in any linkbase, test definition linkbase

Documentation

Same as V-13 but this test should retrieve the hierarchy of children below memB (child), from the definition linkbase, e.g., getting only memA.

Inputs

Outputs

  • Result test: $result instance of xs:QName* and count( $result ) eq 1 and $result [1] eq xs:QName('concept:MemA')

Revisions

Name On Details
Herm Fischer 01-09-2008 at 00:00:00 Created the test case.
Herm Fischer 02-09-2008 at 00:00:00 Added v-10 to v-12 for error code xbrldfe:ambiguousFilterMemberNetwork.
Herm Fischer 25-03-2009 at 00:00:00 Updated V-12 and added v-13 to v-14.
Herm Fischer 09-09-2010 at 00:00:00 Changed input role URIs to strings for cast-less coding and to be similar to fn:QName's $paramURI, an xs:string.
Herm Fischer 11-01-2011 at 00:00:00 Added V-04a, to be sure that a request for children of a child-less member is an empty list.
Herm Fischer 28-02-2011 at 10:00:00 Added missing xmlns:xs. Changed some tests to more compact xs:QName from longer fn:QName
Herm Fischer 10-03-2011 at 23:00:00 Removed errors unrecognisedExplicitDimensionValueQName and ambiguousFilterMemberNetwork/
Herm Fischer 16-03-2011 at 11:00:00 Updated V-11 description and results to reflect that this test case has multiple relationships to its members, but as the result is a set, which by definition has distinct members, the members are reported only once.